// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) 
// Source File Name:   BalanceHandler.java

package com.boci.clientapp.balance.handler;

import com.boci.clientapp.balance.processor.BalanceProcessor;
import com.boci.common.constant.RequestTypeConst;
import com.boci.common.handler.AbstractConnectionHandler;
import com.boci.common.vo.ResponseVO;
import java.util.HashMap;

public class BalanceHandler extends AbstractConnectionHandler
{

    public BalanceHandler(String pReqType)
        throws Exception
    {
        super(pReqType);
    }

    protected ResponseVO processResponse(String pResponseResult)
        throws Exception
    {
        if(getRequestType().equals(RequestTypeConst.BOCI_BALANCE_V2_URL) || getRequestType().equals(RequestTypeConst.BOCI_BALANCE_URL))
        {
            BalanceProcessor balanceProcessor = new BalanceProcessor(pResponseResult, getRequestType());
            return balanceProcessor.processXML();
        } else
        {
            return null;
        }
    }

    public ResponseVO getBalance(HashMap pParamMap)
        throws Exception
    {
        String strResponse = null;
        prepareParameters(pParamMap);
        strResponse = send();
        return processResponse(strResponse);
    }
}
